PATH
WebObjects 4.5 Documentation >
Getting Started With Direct to Java Client
Writing a Custom Rule to Use Your Component
Once you've got a component that provides your customized XML, you need a custom rule that tells the rule system to use your component. The rule looks like this:
- Condition (Lhs): ((task = 'select') and (entity.name = 'Studio'))
- Key (Rhs key): controller
- Value (Rhs value): StudioSelect (the name of the D2WComponent subclass that provides the custom XML)
- Priority: 50
This rule is fired when the controller factory tries to generate the EOQueryController for the select Studio dialog. By default, the rule system would use numerous D2WComponents to generate the XML for the query controller. But with this custom rule, the rule system uses your custom StudioSelect D2WComponent to provide the frozen XML.
© 1999 Apple Computer, Inc. – (Draft. Last updated 05 Jan 00)